<!-- 废弃 -->
<template>
	<view class="CheckList">
		<view class="list">
			<uni-data-checkbox
				mode="list"
				icon="right"
				v-model="value"
				:multiple="true"
				:localdata="range"
				@change="change"
			></uni-data-checkbox>
		</view>
	</view>
</template>

<script>
export default {
	name: 'CheckList',
	props: {},
	data() {
		return {
			searchValue: '',
			value: 0,
			range: []
		};
	},
	onLoad() {
		uni.$on('getCategories', data => {
			console.log('data ==>', data);
			this.range = data.categories;
		});
		console.log('onLoad');
	},
	onUnload() {
		// 移除监听事件
		uni.$off('getCategories');
	},
	methods: {
		change(e) {
			console.log('e:', e);
		}
	}
};
</script>

<style lang="scss">
.CheckList {
	.list {
		padding: 0 32rpx;
	}
}
</style>
